package gweb

import (
	"github.com/gookit/validate"
)

// implements the binding.StructValidator
type customValidator struct{}

func (c *customValidator) ValidateStruct(ptr interface{}) error {
	v := validate.Struct(ptr)
	if v.Validate() {
		return nil
	} else {
		return v.Errors
	}
}

func (c *customValidator) Engine() interface{} {
	return nil
}
